package br.net.woodstock.tickettoride.api.manager;

import java.util.Collection;

import br.net.woodstock.rockframework.domain.service.Service;
import br.net.woodstock.tickettoride.orm.Application;
import br.net.woodstock.tickettoride.orm.User;

public interface ApplicationService extends Service {

	Application getById(Integer id);

	Integer getIdByAlias(String alias);

	Application getByAlias(String alias);

	void save(Application application);

	void update(Application application);

	void delete(Integer id);

	Collection<Application> listByFilter(String filter);

	Collection<Application> listByManager(Integer userId, String filter);

	Collection<Application> getPermiteds(Integer applicationId);

	Collection<User> getManagers(Integer applicationId);

	void saveApplicationPermission(Integer destination, Integer[] sources);

	void saveApplicationManager(Integer application, Integer[] users);

}
